package com.threaddemo6;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class NewSingleThreadExecutor {
    public static void main(String[] args) {
        ExecutorService es = Executors.newSingleThreadExecutor();

        for (int i = 0; i < 10; i++) {
            es.execute(()-> System.out.println("执行 - " + Thread.currentThread().getName()));
        }

        es.shutdown();

    }
}
